package com.ysd.modules.sys.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ysd.modules.sys.dao.SysTeacherDao;
import com.ysd.modules.sys.dao.SysUserRoleDao;
import com.ysd.modules.sys.entity.SysTeacher;
import com.ysd.modules.sys.entity.SysUserRoleEntity;
import com.ysd.modules.sys.service.SysTeacherService;
import com.ysd.modules.sys.service.SysUserRoleService;

@Service("sysTeacherService")
public class SysTeacherServiceImpl extends ServiceImpl<SysTeacherDao, SysTeacher> implements SysTeacherService{

	@Override
	public void AddTeacher(SysTeacher teacher) {
		// TODO Auto-generated method stub
		this.save(teacher);
	}

	@Override
	public void updateTeacher(SysTeacher teacher) {
		// TODO Auto-generated method stub
		this.saveOrUpdate(teacher);
	}

	@Override
	public SysTeacher getByUserId(int userId) {
		// TODO Auto-generated method stub
		
		return baseMapper.queryByUserId(userId);
	}

}
